package vip.sweet.biz.modular.product.service.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import vip.sweet.biz.modular.product.entity.BizProductDetailImages;
import vip.sweet.biz.modular.product.mapper.BizProductDetailImagesMapper;
import vip.sweet.biz.modular.product.params.BizProductDetailImagesAddParams;
import vip.sweet.biz.modular.product.service.BizProductDetailImagesService;

/**
 * @author ASUS
 * @Date 2025/10/5 11:28
 * @Descripition
 */
@Service
public class BizProductDetailImagesServiceImpl extends ServiceImpl<BizProductDetailImagesMapper, BizProductDetailImages> implements BizProductDetailImagesService {
    @Override
    public boolean add(BizProductDetailImagesAddParams bizProductDetailImagesAddParams) {
        if (ObjectUtil.isNotEmpty(bizProductDetailImagesAddParams))
            return save(BeanUtil.toBean(bizProductDetailImagesAddParams, BizProductDetailImages.class));
        return false;
    }
}
